package 并发编程18.多线程start;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

/**
 * @author idea
 * @data 2019/2/24
 */
public class Demo2 {

    static class t2 implements Runnable {

        @Override
        public void run() {
            System.out.println("this is t2");
        }
    }

    public static void main(String[] args) throws InterruptedException, ExecutionException {
        Thread t = new Thread(new t2());
//        t.start();
//        t.join();
        Future future =  Executors.newFixedThreadPool(1)
                .submit(t);
        future.get();
        System.out.println("this is heeee");


    }

}
